A photosensor known in the art can achieve its function when the resin encapsulating an emitter element and a receiver element contains 10% to 30% by weight of light diffusing agent (refer to Patent Literature 1).
Patent Literature 2 describes a photosensor including an emitter element and a receiver element, and an operation indicator lamp indicating whether an object that blocks light is present between the receiver element and the emitter element. The operation indicator lamp is typically a luminous element arranged near an integrated circuit for controlling the receiver element and the emitter element. The luminous element is encapsulated with resin together with the integrated circuit.